var XiaoNeiBlog=new Object();
function onReplyClick(_e,id){
getEl("cmttoid").value=id;
var tmp="\u56de\u590d"+_e+"\uff1a";
SetHTML(tmp,"simplerte");
SetFocus("simplerte");
}
function onPublishComment(){
getEl("cmttoid").value="";
SetHTML("","cmtbody");
SetFocus("cmtbody");
}
function onSend(_11){
var str=getEl(_11).innerHTML;
if(str.substring(8,11)!="\u56de\u590d"){
var _13="<p class='reply'>";
_13+=str;
_13+="</p>";
var out=getEl("cmtbody").value+_13;
getEl("cmtbody").value=out;
}
}
function cc(_15){
try{
var ev=_15.srcElement;
var r=ev.createTextRange();
}
catch(e){
return;
}
r.moveStart("character",ev.value.length);
r.collapse(true);
r.select();
}
String.prototype.trim=function(){
return this.replace(/^\s*|\s*$/g,"");
};
var codee="";
var isNewOrEdit="";
function fnNewEntryCK(){
if(typeof (_DEBUG)!="undefined"){
alert("begin");
}
try{
if(typeof (_DEBUG)!="undefined"){
alert("before title check");
}
if(getEl("title").value==""){
alert("\u8bf7\u7ed9\u65e5\u5fd7\u52a0\u4e2a\u6807\u9898");
getEl("title").focus();
return false;
}
if(typeof (_DEBUG)!="undefined"){
alert("end of title check");
}
if(typeof (_DEBUG)!="undefined"){
alert(getEl("body").value);
}
if(getEl("body").value==""){
alert("\u4f60\u5199\u7684\u65e5\u5fd7\u5185\u5bb9\u4e3a\u7a7a\uff0c\u8fd9\u6837\u4e0d\u597d\u5427\u3002");
return false;
}
if(typeof (_DEBUG)!="undefined"){
alert("5");
}
var _18=getEl("theFile").value;
_18=_18.toLowerCase();
var _19=checkSuffix(_18);
if(_19!=true){
alert("\u4e0d\u652f\u6301\u4e0a\u4f20\u6b64\u7c7b\u578b\u6587\u4ef6,\u8bf7\u68c0\u67e5\u6587\u4ef6\u540d\uff01");
return false;
}
return true;
}
catch(e){
var str="error name: "+e.name+" /  error msg: "+e.message;
getErrorCode(str);
}
}
var fnEditEntryCK=fnNewEntryCK;
function fnPostCommentCK(){
var _1b=getEl("cmtbody").value.length;
if(_1b==0){
alert("\u8bc4\u8bba\u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a");
return false;
}
return true;
}
function checkUpload(){
var _1c=getEl("theFile").value;
if(_1c==""){
alert("\u8bf7\u9009\u62e9\u4e0a\u4f20\u7684\u9644\u4ef6\uff01");
return false;
}
_1c=_1c.toLowerCase();
var _1d=checkSuffix(_1c);
if(_1d!=true){
alert("\u4e0d\u652f\u6301\u4e0a\u4f20\u6b64\u7c7b\u578b\u6587\u4ef6,\u8bf7\u68c0\u67e5\u6587\u4ef6\u540d\uff01");
return false;
}
return true;
}
function checkSuffix(str){
if(str.length==str.trim().length&&str.trim()==""){
return true;
}
try{
var ind=str.lastIndexOf(".");
var _20=[".jpg",".jpeg",".png",".gif",".bmp"];
if(ind>0){
var tmp=str.substring(ind).toLowerCase();
for(i=0;i<_20.length;i++){
if(tmp==_20[i]){
return true;
}
}
return tmp;
}
}
catch(e){
}
return "\u6ca1\u6709\u7c7b\u578b";
}
function getBlogAuthorFriendList(_22){
var url="/showCitySchool.do";
var _24="city="+cityVal;
var _25=new Ajax.Updater({success:"schoolTabPan"},url,{method:"get",parameters:_24,onFailure:reportError});
}

